<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
</head>
<body>
<div id="app">
    <ul>
        <template v-for="(item, key, index) in nameObj">
            <li>{{index}}--{{key}}--{{item}}</li>
            <span>{{item}}</span>
        </template>
    </ul>
</div>


<!--引入vue文件-->
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
<script>

    const vm = Vue.createApp({
        data() {
            return {
                nameObj: {
                    name: "洗衣机",
                    city: "上海",
                    price: "6800元"
                }
            }
        }
    }).mount('#app');

</script>
</body>
</html>
